<?php
/*
 * sidebar.php:
 *     Sidebar Template
 *
 * Copyright (c) 2009 $AUTHOR. Some rights reserved.
 * This work is licenced under a Creative Commons Licence:
 *     <http://creativecommons.org/licenses/by-nc-sa/2.0/uk/>
 *
 * Email: <adam@toomanyhats.org>; WWW: <http://blog.amyl.org.uk>
 *
 * $Id: sidebar.php 99 2009-08-27 21:56:43Z amlnmcgreggor $
 * 
 */
?>
  <div id="sidebar" class="right">
    <?php wp_page_menu('show_home=1&sort_column=menu_order&menu_class=pagenav') ?>

    <ul class="linkedlist">
      <li>
        <?php /* If this is a 404 page */ if (is_404()) { ?>
        <?php /* If this is a category archive */ } elseif (is_category()) { ?>
	<p>You are currently browsing the archives for the 
        <?php single_cat_title(''); ?> category.</p>

	<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
	<p>You are currently browsing the <a href="<?php bloginfo('home'); ?>/">
        <?php echo bloginfo('name'); ?></a> weblog archives for the day 
        <?php the_time('l, F jS, Y'); ?>.</p>

	<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
	<p>You are currently browsing the <a href="<?php bloginfo('home'); ?>/">
        <?php echo bloginfo('name'); ?></a> weblog archives for 
        <?php the_time('F, Y'); ?>.</p>

	<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
	<p>You are currently browsing the <a href="<?php bloginfo('home'); ?>/">
        <?php echo bloginfo('name'); ?></a> weblog archives for 
        the year <?php the_time('Y'); ?>.</p>

	<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
	<p>You have searched the <a href="<?php echo bloginfo('home'); ?>/">
        <?php echo bloginfo('name'); ?></a> weblog archives for 
        <strong>'<?php the_search_query(); ?>'</strong>. If you are 
        unable to find anything in these search results, you can 
        try one of these links.</p>

	<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
	<p>You are currently browsing the <a href="<?php echo bloginfo('home'); ?>/">
        <?php echo bloginfo('name'); ?></a> weblog archives.</p>

        <?php } ?>
      </li>
    </ul>

    <ul class="linkedlist">
      <li><h2 class="reclaimlink"><a href="/reclaim">Write your letter &raquo;</a>
      </h2></li>
      <li><p style="text:smaller">Your letter will be generated as an Adobe 
      <acronym title="Portable Document Format">PDF</acronym> file. To 
      open (and print the letter), you will need something that reads PDFs.
      If you've not already got a reader, a list is available on
      <a href="http://en.wikipedia.org/wiki/List_of_PDF_software#Viewers">Wikipedia</a></p></li>
    </ul>

    <ul class="linkedlist">
      <li><h2>Archives</h2></li>
      <?php wp_get_archives('type=monthly'); ?>
    </ul>
    

    <ul class="outerlinkedlist">
      <?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?>
    
      <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
      <?php wp_list_bookmarks(); ?>
    </ul>

    <ul class="linkedlist rsslinks">
      <li><h2>RSS/Updates by Email</h2></li>
      <li><p class="rss"><a href="http://feeds2.feedburner.com/ReclaimYourDna">RSS</a></p></li>
      <li><p class="rss"><a href="http://feedburner.google.com/fb/a/mailverify?uri=ReclaimYourDna">Blog updates by email</a></p></li>
    </ul>

    <ul class="linkedlist">
        <li><?php wp_loginout(); ?></li>
      <?php } ?>
    </ul>

  </div>
